This resubmitted application responds to PA-18-602 and seeks to determine on a day-to-day basis how, during pregnancy, posttraumatic stress disorder (PTSD) symptoms are associated with opioid use disorder (OUD) relapse, a fundamental gap in the research. A theoretical framework is developed that identifies prenatal bonding and opioid craving as mediators, and emotion regulation and anxiety sensitivity as moderators, of the central PTSD/relapse relationship. This will be the first study to investigate the temporal ebb and flow of risk and protective factors for OUD relapse for pregnant women and, as such, this study advances the more common situation where research, using fixed assessments, investigates pregnant women with various substance use disorders (SUD). This is an excellent model because pregnant women have unique characteristics that change over time potentially associated with relapse. They have high rates of PTSD (relapse risk factor and common OUD comorbidity), and PTSD cues induce craving that triggers relapses. Importantly, pregnant women have a unique relevant biological variable that may be a protective factor - prenatal fetal bonding. The long term goal of this research is to develop empirically-based mobile-health interventions to target proximal risks for OUD relapse as they occur in real time. The central hypothesis is that during pregnancy PTSD symptoms will fluctuate over time and will increase or reduce proximal risk of relapse, and that the PTSD/relapse relationship will be mediated by fluctuations in opioid craving and prenatal bonding and moderated by trait emotion regulation and anxiety sensitivity. The rationale is that factors associated with relapse are not static, but fluctuate over time. Moreover, relapse events occur at moments in time. We propose to use ecological momentary assessment (EMA: using mobile devices) to collect data on fluctuating risk factors and opioid use multiple times per day using a mixed event and time-based design for 6 weeks, to assess proximal risk factors for OUD relapse in pregnant women (N=75). OUD relapse during pregnancy differs from other SUD, since medication-assisted treatment is the recommended standard of care, and is thus better examined separately. Guided by strong preliminary data supporting design feasibility, this hypothesis will be tested via two specific aims: Aim 1. Examine near real time associations during pregnancy between PTSD symptoms and opioid use. Aim 2. Examine mediators (prenatal bonding and craving) and moderators (anxiety sensitivity and emotion regulation) of associations during pregnancy between PTSD symptoms and opioid use. The proposed research is significant, because it is expected to advance our understanding of how fluctuations in PTSD symptoms, craving, and a pregnancy specific protective factor ? prenatal bonding ? impact OUD relapse. Ultimately, this knowledge will lead to science-based mobile-health applications tailored for pregnant women. The approach is innovative because it targets an understudied population and examines fluctuation in proximal risk and protective factors for OUD relapse, while accounting for moderators, using a technique (EMA) not previously applied in this context.